﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore
{
    public class MyDbContext:DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            //连接字符串
            string connStr = @"server=.;database=HR;user=sa;pwd=cssl#123;Encrypt=False;";
            optionsBuilder.UseSqlServer(connStr);
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfigurationsFromAssembly(this.GetType().Assembly);
        }

        public DbSet<Student>  Student { get; set; }
		public DbSet<User> User { get; set; }
		public DbSet<Bonus> Bonus { get; set; }
		public DbSet<CFFK> CFFK { get; set; }
		public DbSet<CFSK> CFSK { get; set; }

		public DbSet<CFTK> CFTK { get; set; }
		public DbSet<CM> CM { get; set; }

		public DbSet<Recruitment> recruitments { get; set; }
		public DbSet<CMK> CMK { get; set; }
		public DbSet<CPC> CPC { get; set; }
		public DbSet<CQFK> CQFK { get; set; }
		public DbSet<CQSK> CQSK { get; set; }
		public DbSet<EA> EA { get; set; }
		public DbSet<EAD> EAD { get; set; }
		public DbSet<EE> EE { get; set; }
		public DbSet<EED> EED { get; set; }
		public DbSet<EI> EI { get; set; }
		public DbSet<EMR> EMR { get; set; }
		public DbSet<ER> ER { get; set; }
		public DbSet<ES> ES { get; set; }
		public DbSet<GroupMenu> GroupMenu { get; set; }
		public DbSet<HF> HF { get; set; }
		public DbSet<HFD> HFD { get; set; }
		public DbSet<Jurisdiction> Jurisdiction { get; set; }
		public DbSet<MC> MC { get; set; }
		public DbSet<Roles> Role { get; set; }
		public DbSet<RoleJurisdiction> RoleJurisdiction { get; set; }
		public DbSet<SG> SG { get; set; }
		public DbSet<SGD> SGD { get; set; }
		public DbSet<SS> SS { get; set; }
		public DbSet<SSD> SSD { get; set; }
		public DbSet<Training> Training { get; set; }
		public DbSet<IAM> IAM { get; set; }
	}
}
